package com.frxuexi.park2301.user

import androidx.lifecycle.MutableLiveData
import com.frxuexi.lib_base.entity.UserBean
import com.frxuexi.lib_base.mvvm.BaseViewModel
import com.frxuexi.lib_base.net.ApiService
import dagger.hilt.android.lifecycle.HiltViewModel
import javax.inject.Inject

@HiltViewModel
class UserViewModel @Inject constructor(val apiService: ApiService):BaseViewModel() {
    val loginData =MutableLiveData<UserBean>()

    fun login(username:String,pwd:String){
        httpRequest({apiService.login(username,pwd)},loginData::postValue)
    }
}